<%=link_to "back", games_path%><br/>
<%=link_to "deal", deal_path(@game.id, @player_id.nil? ? 0 : @player_id)%>
<% if @game.contract_final %>
	Contract: <%=@game.contract_value%><%=@game.contract_suit%> by: <%=@contract_player_name%>
<% end%>
<table border="1" width="100%" height="100%">
<tr height="33%">
	<td width="33%">&nbsp;</td>
	<td width="33%" bgcolor="<%= @north.nil? || @north.id != @game.active_player_id ? "#FFFFFF" : "#00FF00" %>" valign="top" align="center">
		<%= @north.nil? ? "" : @north.name%><br/><%=render :partial => 'hand', :locals => {:player_id => @player_id, :player => @north.nil? ? nil : @north}%>
	</td>
	<td width="33%">&nbsp;</td>
</tr>
<tr height="33%">
	<td bgcolor="<%= @west.nil? || @west.id != @game.active_player_id ? "#FFFFFF" : "#00FF00" %>" valign="top" align="center">
		<%= @west.nil? ? "" : @west.name%><br/><%=render :partial => 'hand', :locals => {:player_id => @player_id, :player => @west.nil? ? nil : @west}%>
	 </td>
	<td><%if !@game.active_player_id.nil? && @game.active_player_id.to_s == @player_id && @game.contract_final.nil? %><%=render :partial => 'bid', :locals => {:player_id => @player_id, :game_id => @game.id} %><% end %></td>
	<td bgcolor="<%= @east.nil? || @east.id != @game.active_player_id ? "#FFFFFF" : "#00FF00" %>" valign="top" align="center">
		<%= @east.nil? ? "" : @east.name%><br/><%=render :partial => 'hand', :locals => {:player_id => @player_id, :player => @east.nil? ? nil : @east}%>
 	</td>
</tr>
<tr height="33%">
	<td>&nbsp;</td>
	<td bgcolor="<%= @south.nil? || @south.id != @game.active_player_id ? "#FFFFFF" : "#00FF00" %>" valign="top" align="center">
	<%= @south.nil? ? "" : @south.name%><br/><%=render :partial => 'hand', :locals => {:player_id => @player_id, :player => @south.nil? ? nil : @south}%>
 </td>
	<td>&nbsp;</td>
</tr>
</table>
<%= hidden_field_tag :player_id, @player_id %>

	
